package com.erlinyou.im.web.controller.base;

/**
 * 1		成功
 * 2-10 	登录相关
 * 10-20	发送消息相关
 * 21-30    群聊相关   
 * 31-40	好友相关    
 * @author Administrator
 *
 */
public enum ResultCode {
    SUCCESS(1, "成功"),
    LOGIN_FAIL(2, "登录失败,用户不存在,或者密码错误"),
    LOGIN_NOT(3, "用户未登录"),
    LOGIN_SOURCE_ERROR(4, "来源错误"),
    
    SENDMSG_EXISTS(10, "发送的消息已经存在"),
    SENDMSG_NOTUSER(11, "用户或群不存在"),
    SENDMSG_MEMNOTUSER(12, "群成员不存在该成员"),
    
    
    GROUP_CREATE_ERROR(21, "创建群聊成员必须为好友"),
    GROUP_REMOVE_ERROR(22, "移除群成员不存在或权限不足"),
    GROUP_GETMEN_ERROR(23, "获取群成员失败，权限不足"),
    GROUP_UPNAME_ERROR(24, "修改群名称失败，权限不足"),
    
    FIREND_ADDFIREND_ERROR(31, "不能重复添加好友"),
    FIREND_NON_EXISTENT(32, "添加好友不存在"),

    POI_ERROR(40, "POI错误"),
    
    UNKONW_ERROR(99, "未知错误");
    private Integer code;

    private String msg;

    ResultCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
    
}
